home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-12-28 | 6.8 KB | 269 lines | [TEXT/ttxt] |
- "UltraSort version 1.3"
-
- by Murray Cohn
-
-
-
- Please display this document in Monoco 9 pt or the columns will be
- out of order. Insert proper headers/footers/margins before
- printing.
-
-
- This program will sort textfiles alphabetically, or in the case of
-
- lines that have numbers in the first characters of the string, the
- program will sort those lines by the numbers. Version 1.3 now
- allows sorting from
-
- a particular character almost anywhere in the line. It has some
- decorative color added. It sorts very quickly using a binary tree
- system. A progress report
-
- shows how many records have been read and have been written to a
- filename
-
- of your own choosing. It will sort 200 records in well under a
- minute.
-
-
- REQUIREMENTS. Read now or suffer later.
-
-
- Dissappointedly, versions 1.3 might not run on Mac II's. It has
- been tested successfully with the 128K rom. It therefore should
- work both on 512Ke (enhanced) as well as MacPlus. Until just last
- week, I didn't realize that the compiler would not create useable
- for code for Mac II's; other Macs have not been tested. If you
- would like to report your results to Compuserve user ID 72707,2144
- in email many people would appreciate the news.
-
-
- It works fine on a MAC LC.
-
-
- Make a plain text file of your data using your word processor or
- editor
-
- (MacWrite is fine) and save as plain text. Check your manual or a
-
- friend if you don't know how to do this. Any plain text doc will
- work.
-
-
- Requirements are:
-
-
- A) You have a carriage return at every line.
-
- B) Every line must never be more than 80 characters long.
-
- C) You must have no empty lines within your list except at the end.
-
- D) Textfiles are to be set up with spaces, not tabs if you are to
-
- sort by a character other than the first character of the line.
-
- E) There must be a final carriage return at the end of the very
-
- last line.
-
-
- Otherwise, this pascal based program gets confused and crashes never
- finding it's desired carriage return. Remember that wordwrap is not
- allowed, carriage returns at the end of every line is required.
-
-
- During program run, you may choose a the field to sort by the
- character number on the line. Normally sorting is done from
- character in position 1, but you may choose to sort from a field
- deep in the middle of the line. You will be prompted with a brief
- explanation for the character position from which to do the sorting.
-
-
- You are protected from yourself...
-
-
- ...as far as trying to save the final sorted list on top of the
-
- original unsorted "raw" list. You are also protected from having to
-
- worry about duplicating lines. Go ahead! Duplicate! They final
-
- sorted file will have only one line for duplicated lines in "raw"
-
- input, having eliminated them in memory during sorting.
-
-
- BUT UltraSort is not entirely bomb proof.
-
-
- You can experiment to see how many you can get away with
-
- on your machine BY USING A COPY OF YOUR DATA FILE not the original.
-
-
- If you are not sure and don't have time to check for above
- sitiuations, then:
-
-
- Make a copy (a good habit for testing stuff). Use the finder to
- make
-
- a your test copy. I am supplying a list of Colorado BBS's as a way
-
- for you to experience this program functioning ok. (Thanks to Col.
-
- Cool Cat, a user of SCCORE BBS)
-
-
-
- Run this program on the COPY of your data, not the original.
-
-
-
- **EXAMPLE**
-
-
- First few lines of "RAW" INPUT DATA (you can see it's sorted by
- number
-
- but not by name which we will do with UltraSort)
-
-
- Maximum Security 303-232-5977
-
- Lucky Seven 303-232-6239 12
-
- Fred's BBS 303-233-1316 24
-
- Microlink D 303-237-8575 96
-
- Den of Iniquity 303-238-5750 24
-
- BatCave 303-252-0735 12
-
- 8th Sea, The 303-252-9235 24
-
- ...
-
-
- Run the program, choose the BBSRAWNUM file as input, use the default
- name SORTED.TXT as the output file, and enter "1" when prompted
- "which character to sort from, since the names all begin with the
- first character on the line.
-
-
-
- First few lines of "SORTED.TXT" OUTPUT DATA after above
-
- is sorted by UltraSort.
-
-
- Notice alphabetical listing on left, and that
-
- numbers like "8th" come before the latter "A" after sorting.
- (Now
-
- the numbers on the right are obviously no longer in order.)
-
-
-
- 8th Sea, The 303-252-9235 24
-
- Aces High 303-366-8159 24
-
- Adelante 303-443-8292 24
-
- Albequerque Starport, The 303-499-6974 12
-
- Arvada 68k BBS 303-424-9831 24
-
- Assasin's Guild 303-722-6881
-
- Atari Club BBS 303-343-2956 24
-
- Aurora Chairman 303-340-1844 12
-
- 12345678901234567890123456789012345678901 <--I wrote this for easy
-
- counting. Use Monoco
- Font for
-
- even counting and even
- columns.
-
-
- The first character on a line is character "1" not character "0" for
- UltraSort's counting purposes.
-
-
-
- Sometimes you would want to keep both versions of the files and it
- is
-
- for this reason that the program won't allow you to erase the
- original
-
- "raw" data (by naming input and output files as the same).
-
-
- To "sort by" a character other than "1"
-
-
- At this point you could sort on the 37th character by the area
- codes, or else since all area codes are the same, you could sort by
- the 41st character. "Sort by..." means just the starting postion to
- sort, all remaining characters are also used up till the end of the
- line. This time you are using "SORTED.TXT' as the input file so you
- need yet another name for yet another output file. The result after
- sorting by the 37th or 41st character will produce a file just like
- BBSRAWNUM from which you started. There may be a few "stray"
- carriage returns at the bottom.
-
-
- Use monofonts like Monoco to display all files listed in columns to
- keep all columns lined up evenly and to make character counting
- easier. UltraSort does not manage files set up with tabs very well
- (unless you are sorting from the first character).
-
-
- DISCLAIMER:
-
-
- I hate to add this, but due to a small number of people,
-
- I have to add that I can't be responsible for your own mistakes.
-
- This program is tested. As long as you followed these instructions
-
- you will be fine. If I had done much more error-trapping, this
- program
-
- would not be affordable for you. It had no viruses at the time of
-
- distribution. The program will not harm any of your programs or
- hardware. It is very safe.
-
-
- THE FUTURE:
-
-
- Improvements from demo ver 1.0 to ver 1.3.
-
-
- I apologize for inconveniences that were caused in older versions.
- Color is now added; and the sorting feature which allows you to sort
- on a character other than the first character in a line--is now.
-
-
- Registration Fee is $15.00
-
-
- Murray Cohn
-
- 3550 S. Pennsylvania St. #308
-
- Englewood, CO 80110
-
-
-